\hypertarget{utlist_8h}{
\section{utlist.h File Reference}
\label{utlist_8h}\index{utlist.h@{utlist.h}}
}


A linked list implementation using macros.  


\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{utlist_8h_a9f3779f3c49ddf609c97f1c3d1f29730}{UTLIST\_\-VERSION}~1.9.1
\item 
\#define \hyperlink{utlist_8h_ae8c9864192170d02fd996abaa1589611}{LDECLTYPE}(x)~\_\-\_\-typeof(x)
\begin{DoxyCompactList}\small\item\em This file contains macros to manipulate singly and doubly-\/linked lists. \item\end{DoxyCompactList}\item 
\hypertarget{utlist_8h_a9eded80a8b98df631e889eb72b77c7a4}{
\#define {\bfseries \_\-SV}(elt, list)}
\label{utlist_8h_a9eded80a8b98df631e889eb72b77c7a4}

\item 
\hypertarget{utlist_8h_aec696573e92f2ebd0a1641d77bb5b0fe}{
\#define {\bfseries \_\-NEXT}(elt, list)~((elt)-\/$>$next)}
\label{utlist_8h_aec696573e92f2ebd0a1641d77bb5b0fe}

\item 
\hypertarget{utlist_8h_a93e2d161c8ad8350100a4fad092ef058}{
\#define {\bfseries \_\-NEXTASGN}(elt, list, to)~((elt)-\/$>$next)=(to)}
\label{utlist_8h_a93e2d161c8ad8350100a4fad092ef058}

\item 
\hypertarget{utlist_8h_ade8452ec59d6bf7ef23770ee4d96f8d5}{
\#define {\bfseries \_\-PREV}(elt, list)~((elt)-\/$>$prev)}
\label{utlist_8h_ade8452ec59d6bf7ef23770ee4d96f8d5}

\item 
\hypertarget{utlist_8h_a6f6acf0ac7f07dcb26cef2110fef496a}{
\#define {\bfseries \_\-PREVASGN}(elt, list, to)~((elt)-\/$>$prev)=(to)}
\label{utlist_8h_a6f6acf0ac7f07dcb26cef2110fef496a}

\item 
\hypertarget{utlist_8h_a9916f2c26fd7f6f7edb1f6baf400f315}{
\#define {\bfseries \_\-RS}(list)}
\label{utlist_8h_a9916f2c26fd7f6f7edb1f6baf400f315}

\item 
\hypertarget{utlist_8h_a1eb4a3192390405087ef1bb6c57241e3}{
\#define {\bfseries \_\-CASTASGN}(a, b)~(a)=(b)}
\label{utlist_8h_a1eb4a3192390405087ef1bb6c57241e3}

\item 
\hypertarget{utlist_8h_a0b2137d4a0c157cb7a1a30d9340ece31}{
\#define {\bfseries LL\_\-SORT}(list, cmp)}
\label{utlist_8h_a0b2137d4a0c157cb7a1a30d9340ece31}

\item 
\hypertarget{utlist_8h_ad966f284f615a2ced4028258fa08f8f3}{
\#define {\bfseries DL\_\-SORT}(list, cmp)}
\label{utlist_8h_ad966f284f615a2ced4028258fa08f8f3}

\item 
\hypertarget{utlist_8h_a13add78e5524efe1ae6bfb1631b2dc17}{
\#define {\bfseries CDL\_\-SORT}(list, cmp)}
\label{utlist_8h_a13add78e5524efe1ae6bfb1631b2dc17}

\item 
\#define {\bfseries LL\_\-PREPEND}(head, add)
\item 
\#define {\bfseries LL\_\-APPEND}(head, add)
\item 
\#define {\bfseries LL\_\-DELETE}(head, del)
\item 
\#define {\bfseries LL\_\-APPEND\_\-VS2008}(head, add)
\item 
\#define {\bfseries LL\_\-DELETE\_\-VS2008}(head, del)
\item 
\hypertarget{utlist_8h_a487c0ce49f397e1743caae16a797e4bb}{
\#define {\bfseries LL\_\-FOREACH}(head, el)~for(el=head;el;el=el-\/$>$next)}
\label{utlist_8h_a487c0ce49f397e1743caae16a797e4bb}

\item 
\hypertarget{utlist_8h_ad0a695664d31f0b929fd50b39ebcf0ef}{
\#define {\bfseries LL\_\-FOREACH\_\-SAFE}(head, el, tmp)~for((el)=(head);(el) \&\& (tmp = (el)-\/$>$next, 1); (el) = tmp)}
\label{utlist_8h_ad0a695664d31f0b929fd50b39ebcf0ef}

\item 
\#define {\bfseries LL\_\-SEARCH\_\-SCALAR}(head, out, field, val)
\item 
\#define {\bfseries LL\_\-SEARCH}(head, out, elt, cmp)
\item 
\#define {\bfseries DL\_\-PREPEND}(head, add)
\item 
\#define {\bfseries DL\_\-APPEND}(head, add)
\item 
\#define {\bfseries DL\_\-DELETE}(head, del)
\item 
\hypertarget{utlist_8h_abb0c2851c5f0567be7b8827ce5168ef7}{
\#define {\bfseries DL\_\-FOREACH}(head, el)~for(el=head;el;el=el-\/$>$next)}
\label{utlist_8h_abb0c2851c5f0567be7b8827ce5168ef7}

\item 
\hypertarget{utlist_8h_a3bb0c84a69846d2f019a97ea0b4709aa}{
\#define {\bfseries DL\_\-FOREACH\_\-SAFE}(head, el, tmp)~for((el)=(head);(el) \&\& (tmp = (el)-\/$>$next, 1); (el) = tmp)}
\label{utlist_8h_a3bb0c84a69846d2f019a97ea0b4709aa}

\item 
\hypertarget{utlist_8h_a172fce2d647fdedadf0f8080e0441c5b}{
\#define {\bfseries DL\_\-SEARCH\_\-SCALAR}~LL\_\-SEARCH\_\-SCALAR}
\label{utlist_8h_a172fce2d647fdedadf0f8080e0441c5b}

\item 
\hypertarget{utlist_8h_a819373d14278b52c313b743acc292ba0}{
\#define {\bfseries DL\_\-SEARCH}~LL\_\-SEARCH}
\label{utlist_8h_a819373d14278b52c313b743acc292ba0}

\item 
\#define {\bfseries CDL\_\-PREPEND}(head, add)
\item 
\#define {\bfseries CDL\_\-DELETE}(head, del)
\item 
\hypertarget{utlist_8h_a795df7857792d7e811709a060c911a36}{
\#define {\bfseries CDL\_\-FOREACH}(head, el)~for(el=head;el;el=(el-\/$>$next==head ? 0L : el-\/$>$next))}
\label{utlist_8h_a795df7857792d7e811709a060c911a36}

\item 
\#define {\bfseries CDL\_\-FOREACH\_\-SAFE}(head, el, tmp1, tmp2)
\item 
\#define {\bfseries CDL\_\-SEARCH\_\-SCALAR}(head, out, field, val)
\item 
\#define {\bfseries CDL\_\-SEARCH}(head, out, elt, cmp)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
A linked list implementation using macros. \begin{DoxySeeAlso}{See also}
\href{http://uthash.sourceforge.net/utlist}{\tt http://uthash.sourceforge.net/utlist} 
\end{DoxySeeAlso}


Definition in file \hyperlink{utlist_8h_source}{utlist.h}.



\subsection{Define Documentation}
\hypertarget{utlist_8h_a60fd7696c4d0865f53a07579a7b08235}{
\index{utlist.h@{utlist.h}!CDL\_\-DELETE@{CDL\_\-DELETE}}
\index{CDL\_\-DELETE@{CDL\_\-DELETE}!utlist.h@{utlist.h}}
\subsubsection[{CDL\_\-DELETE}]{\setlength{\rightskip}{0pt plus 5cm}\#define CDL\_\-DELETE(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{del}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a60fd7696c4d0865f53a07579a7b08235}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  if ( ((head)==(del)) && ((head)->next == (head))) {                            
                    \
      (head) = 0L;                                                               
                    \
  } else {                                                                       
                    \
     (del)->next->prev = (del)->prev;                                            
                    \
     (del)->prev->next = (del)->next;                                            
                    \
     if ((del) == (head)) (head)=(del)->next;                                    
                    \
  }                                                                              
                    \
} while (0);
\end{DoxyCode}


Definition at line 464 of file utlist.h.

\hypertarget{utlist_8h_abdb80106f7733e37fbe4f62e9d97ccfd}{
\index{utlist.h@{utlist.h}!CDL\_\-FOREACH\_\-SAFE@{CDL\_\-FOREACH\_\-SAFE}}
\index{CDL\_\-FOREACH\_\-SAFE@{CDL\_\-FOREACH\_\-SAFE}!utlist.h@{utlist.h}}
\subsubsection[{CDL\_\-FOREACH\_\-SAFE}]{\setlength{\rightskip}{0pt plus 5cm}\#define CDL\_\-FOREACH\_\-SAFE(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{el, }
\item[{}]{tmp1, }
\item[{}]{tmp2}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_abdb80106f7733e37fbe4f62e9d97ccfd}
{\bfseries Value:}
\begin{DoxyCode}
for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL);                            
                  \
      (el) && ((tmp2)=(el)->next, 1);                                            
                    \
      ((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
\end{DoxyCode}


Definition at line 478 of file utlist.h.

\hypertarget{utlist_8h_a6c6a7232d281eab4b18563b92e5653bd}{
\index{utlist.h@{utlist.h}!CDL\_\-PREPEND@{CDL\_\-PREPEND}}
\index{CDL\_\-PREPEND@{CDL\_\-PREPEND}!utlist.h@{utlist.h}}
\subsubsection[{CDL\_\-PREPEND}]{\setlength{\rightskip}{0pt plus 5cm}\#define CDL\_\-PREPEND(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a6c6a7232d281eab4b18563b92e5653bd}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
 if (head) {                                                                     
                    \
   (add)->prev = (head)->prev;                                                   
                    \
   (add)->next = (head);                                                         
                    \
   (head)->prev = (add);                                                         
                    \
   (add)->prev->next = (add);                                                    
                    \
 } else {                                                                        
                    \
   (add)->prev = (add);                                                          
                    \
   (add)->next = (add);                                                          
                    \
 }                                                                               
                    \
(head)=(add);                                                                    
                    \
} while (0)
\end{DoxyCode}


Definition at line 450 of file utlist.h.

\hypertarget{utlist_8h_afb329a0bdf1fa0b644317e9d84082e1e}{
\index{utlist.h@{utlist.h}!CDL\_\-SEARCH@{CDL\_\-SEARCH}}
\index{CDL\_\-SEARCH@{CDL\_\-SEARCH}!utlist.h@{utlist.h}}
\subsubsection[{CDL\_\-SEARCH}]{\setlength{\rightskip}{0pt plus 5cm}\#define CDL\_\-SEARCH(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{out, }
\item[{}]{elt, }
\item[{}]{cmp}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_afb329a0bdf1fa0b644317e9d84082e1e}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
    CDL_FOREACH(head,out) {                                                      
                    \
      if ((cmp(out,elt))==0) break;                                              
                    \
    }                                                                            
                    \
} while(0)
\end{DoxyCode}


Definition at line 490 of file utlist.h.

\hypertarget{utlist_8h_ad064cddb894b478b3c3cd23719f58651}{
\index{utlist.h@{utlist.h}!CDL\_\-SEARCH\_\-SCALAR@{CDL\_\-SEARCH\_\-SCALAR}}
\index{CDL\_\-SEARCH\_\-SCALAR@{CDL\_\-SEARCH\_\-SCALAR}!utlist.h@{utlist.h}}
\subsubsection[{CDL\_\-SEARCH\_\-SCALAR}]{\setlength{\rightskip}{0pt plus 5cm}\#define CDL\_\-SEARCH\_\-SCALAR(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{out, }
\item[{}]{field, }
\item[{}]{val}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_ad064cddb894b478b3c3cd23719f58651}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
    CDL_FOREACH(head,out) {                                                      
                    \
      if ((out)->field == (val)) break;                                          
                    \
    }                                                                            
                    \
} while(0)
\end{DoxyCode}


Definition at line 483 of file utlist.h.

\hypertarget{utlist_8h_a17d40c945e1dc55490feb2fe160670c8}{
\index{utlist.h@{utlist.h}!DL\_\-APPEND@{DL\_\-APPEND}}
\index{DL\_\-APPEND@{DL\_\-APPEND}!utlist.h@{utlist.h}}
\subsubsection[{DL\_\-APPEND}]{\setlength{\rightskip}{0pt plus 5cm}\#define DL\_\-APPEND(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a17d40c945e1dc55490feb2fe160670c8}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  if (head) {                                                                    
                    \
      (add)->prev = (head)->prev;                                                
                    \
      (head)->prev->next = (add);                                                
                    \
      (head)->prev = (add);                                                      
                    \
      (add)->next = NULL;                                                        
                    \
  } else {                                                                       
                    \
      (head)=(add);                                                              
                    \
      (head)->prev = (head);                                                     
                    \
      (head)->next = NULL;                                                       
                    \
  }                                                                              
                    \
} while (0);
\end{DoxyCode}


Definition at line 404 of file utlist.h.

\hypertarget{utlist_8h_aad429903354ffe8cdf4ca2e9d0ae89cc}{
\index{utlist.h@{utlist.h}!DL\_\-DELETE@{DL\_\-DELETE}}
\index{DL\_\-DELETE@{DL\_\-DELETE}!utlist.h@{utlist.h}}
\subsubsection[{DL\_\-DELETE}]{\setlength{\rightskip}{0pt plus 5cm}\#define DL\_\-DELETE(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{del}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_aad429903354ffe8cdf4ca2e9d0ae89cc}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  if ((del)->prev == (del)) {                                                    
                    \
      (head)=NULL;                                                               
                    \
  } else if ((del)==(head)) {                                                    
                    \
      (del)->next->prev = (del)->prev;                                           
                    \
      (head) = (del)->next;                                                      
                    \
  } else {                                                                       
                    \
      (del)->prev->next = (del)->next;                                           
                    \
      if ((del)->next) {                                                         
                    \
          (del)->next->prev = (del)->prev;                                       
                    \
      } else {                                                                   
                    \
          (head)->prev = (del)->prev;                                            
                    \
      }                                                                          
                    \
  }                                                                              
                    \
} while (0);
\end{DoxyCode}


Definition at line 418 of file utlist.h.

\hypertarget{utlist_8h_a78be4dea3344ba1b1c7fe1b893c0fdfa}{
\index{utlist.h@{utlist.h}!DL\_\-PREPEND@{DL\_\-PREPEND}}
\index{DL\_\-PREPEND@{DL\_\-PREPEND}!utlist.h@{utlist.h}}
\subsubsection[{DL\_\-PREPEND}]{\setlength{\rightskip}{0pt plus 5cm}\#define DL\_\-PREPEND(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a78be4dea3344ba1b1c7fe1b893c0fdfa}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
 (add)->next = head;                                                             
                    \
 if (head) {                                                                     
                    \
   (add)->prev = (head)->prev;                                                   
                    \
   (head)->prev = (add);                                                         
                    \
 } else {                                                                        
                    \
   (add)->prev = (add);                                                          
                    \
 }                                                                               
                    \
 (head) = (add);                                                                 
                    \
} while (0)
\end{DoxyCode}


Definition at line 392 of file utlist.h.

\hypertarget{utlist_8h_ae8c9864192170d02fd996abaa1589611}{
\index{utlist.h@{utlist.h}!LDECLTYPE@{LDECLTYPE}}
\index{LDECLTYPE@{LDECLTYPE}!utlist.h@{utlist.h}}
\subsubsection[{LDECLTYPE}]{\setlength{\rightskip}{0pt plus 5cm}\#define LDECLTYPE(
\begin{DoxyParamCaption}
\item[{}]{x}
\end{DoxyParamCaption}
)~\_\-\_\-typeof(x)}}
\label{utlist_8h_ae8c9864192170d02fd996abaa1589611}


This file contains macros to manipulate singly and doubly-\/linked lists. 

1. LL\_\- macros: singly-\/linked lists. 2. DL\_\- macros: doubly-\/linked lists. 3. CDL\_\- macros: circular doubly-\/linked lists.

To use singly-\/linked lists, your structure must have a \char`\"{}next\char`\"{} pointer. To use doubly-\/linked lists, your structure must \char`\"{}prev\char`\"{} and \char`\"{}next\char`\"{} pointers. Either way, the pointer to the head of the list must be initialized to NULL.

-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/.EXAMPLE -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/ struct item \{ int id; struct item $\ast$prev, $\ast$next; \}

struct item $\ast$list = NULL:

int main() \{ struct item $\ast$item; ... allocate and populate item ... DL\_\-APPEND(list, item); \} -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/

For doubly-\/linked lists, the append and delete macros are O(1) For singly-\/linked lists, append and delete are O(n) but prepend is O(1) The sort macro is O(n log(n)) for all types of single/double/circular lists. 

Definition at line 80 of file utlist.h.

\hypertarget{utlist_8h_ace33c571c3df78e721a99a4494983855}{
\index{utlist.h@{utlist.h}!LL\_\-APPEND@{LL\_\-APPEND}}
\index{LL\_\-APPEND@{LL\_\-APPEND}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-APPEND}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-APPEND(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_ace33c571c3df78e721a99a4494983855}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  LDECLTYPE(head) _tmp;                                                          
                    \
  (add)->next=NULL;                                                              
                    \
  if (head) {                                                                    
                    \
    _tmp = head;                                                                 
                    \
    while (_tmp->next) { _tmp = _tmp->next; }                                    
                    \
    _tmp->next=(add);                                                            
                    \
  } else {                                                                       
                    \
    (head)=(add);                                                                
                    \
  }                                                                              
                    \
} while (0)
\end{DoxyCode}


Definition at line 301 of file utlist.h.

\hypertarget{utlist_8h_a3c301ddde2cfd8c32df4137c902b66f3}{
\index{utlist.h@{utlist.h}!LL\_\-APPEND\_\-VS2008@{LL\_\-APPEND\_\-VS2008}}
\index{LL\_\-APPEND\_\-VS2008@{LL\_\-APPEND\_\-VS2008}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-APPEND\_\-VS2008}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-APPEND\_\-VS2008(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a3c301ddde2cfd8c32df4137c902b66f3}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  if (head) {                                                                    
                    \
    (add)->next = head;     /* use add->next as a temp variable */               
                    \
    while ((add)->next->next) { (add)->next = (add)->next->next; }               
                    \
    (add)->next->next=(add);                                                     
                    \
  } else {                                                                       
                    \
    (head)=(add);                                                                
                    \
  }                                                                              
                    \
  (add)->next=NULL;                                                              
                    \
} while (0)
\end{DoxyCode}


Definition at line 331 of file utlist.h.

\hypertarget{utlist_8h_a34a4e54d488753465f6e87bb63b93c0e}{
\index{utlist.h@{utlist.h}!LL\_\-DELETE@{LL\_\-DELETE}}
\index{LL\_\-DELETE@{LL\_\-DELETE}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-DELETE}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-DELETE(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{del}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a34a4e54d488753465f6e87bb63b93c0e}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  LDECLTYPE(head) _tmp;                                                          
                    \
  if ((head) == (del)) {                                                         
                    \
    (head)=(head)->next;                                                         
                    \
  } else {                                                                       
                    \
    _tmp = head;                                                                 
                    \
    while (_tmp->next && (_tmp->next != (del))) {                                
                    \
      _tmp = _tmp->next;                                                         
                    \
    }                                                                            
                    \
    if (_tmp->next) {                                                            
                    \
      _tmp->next = ((del)->next);                                                
                    \
    }                                                                            
                    \
  }                                                                              
                    \
} while (0)
\end{DoxyCode}


Definition at line 314 of file utlist.h.

\hypertarget{utlist_8h_a832d4d46464fb2dada9e198ad4f70cdf}{
\index{utlist.h@{utlist.h}!LL\_\-DELETE\_\-VS2008@{LL\_\-DELETE\_\-VS2008}}
\index{LL\_\-DELETE\_\-VS2008@{LL\_\-DELETE\_\-VS2008}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-DELETE\_\-VS2008}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-DELETE\_\-VS2008(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{del}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a832d4d46464fb2dada9e198ad4f70cdf}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  if ((head) == (del)) {                                                         
                    \
    (head)=(head)->next;                                                         
                    \
  } else {                                                                       
                    \
    char *_tmp = (char*)(head);                                                  
                    \
    while (head->next && (head->next != (del))) {                                
                    \
      head = head->next;                                                         
                    \
    }                                                                            
                    \
    if (head->next) {                                                            
                    \
      head->next = ((del)->next);                                                
                    \
    }                                                                            
                    \
    {                                                                            
                    \
      char **_head_alias = (char**)&(head);                                      
                    \
      *_head_alias = _tmp;                                                       
                    \
    }                                                                            
                    \
  }                                                                              
                    \
} while (0)
\end{DoxyCode}


Definition at line 343 of file utlist.h.

\hypertarget{utlist_8h_a851fb4b583b0dc000097eeee6dd551d4}{
\index{utlist.h@{utlist.h}!LL\_\-PREPEND@{LL\_\-PREPEND}}
\index{LL\_\-PREPEND@{LL\_\-PREPEND}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-PREPEND}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-PREPEND(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{add}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a851fb4b583b0dc000097eeee6dd551d4}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
  (add)->next = head;                                                            
                    \
  head = add;                                                                    
                    \
} while (0)
\end{DoxyCode}


Definition at line 295 of file utlist.h.

\hypertarget{utlist_8h_af7a5ae66c9386c4b89403d9ca038adcb}{
\index{utlist.h@{utlist.h}!LL\_\-SEARCH@{LL\_\-SEARCH}}
\index{LL\_\-SEARCH@{LL\_\-SEARCH}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-SEARCH}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-SEARCH(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{out, }
\item[{}]{elt, }
\item[{}]{cmp}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_af7a5ae66c9386c4b89403d9ca038adcb}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
    LL_FOREACH(head,out) {                                                       
                    \
      if ((cmp(out,elt))==0) break;                                              
                    \
    }                                                                            
                    \
} while(0)
\end{DoxyCode}


Definition at line 382 of file utlist.h.

\hypertarget{utlist_8h_a8c5c97079c5b259e4c0ff7c563b0f8ed}{
\index{utlist.h@{utlist.h}!LL\_\-SEARCH\_\-SCALAR@{LL\_\-SEARCH\_\-SCALAR}}
\index{LL\_\-SEARCH\_\-SCALAR@{LL\_\-SEARCH\_\-SCALAR}!utlist.h@{utlist.h}}
\subsubsection[{LL\_\-SEARCH\_\-SCALAR}]{\setlength{\rightskip}{0pt plus 5cm}\#define LL\_\-SEARCH\_\-SCALAR(
\begin{DoxyParamCaption}
\item[{}]{head, }
\item[{}]{out, }
\item[{}]{field, }
\item[{}]{val}
\end{DoxyParamCaption}
)}}
\label{utlist_8h_a8c5c97079c5b259e4c0ff7c563b0f8ed}
{\bfseries Value:}
\begin{DoxyCode}
do {                                                                             
                    \
    LL_FOREACH(head,out) {                                                       
                    \
      if ((out)->field == (val)) break;                                          
                    \
    }                                                                            
                    \
} while(0)
\end{DoxyCode}


Definition at line 375 of file utlist.h.

\hypertarget{utlist_8h_a9f3779f3c49ddf609c97f1c3d1f29730}{
\index{utlist.h@{utlist.h}!UTLIST\_\-VERSION@{UTLIST\_\-VERSION}}
\index{UTLIST\_\-VERSION@{UTLIST\_\-VERSION}!utlist.h@{utlist.h}}
\subsubsection[{UTLIST\_\-VERSION}]{\setlength{\rightskip}{0pt plus 5cm}\#define UTLIST\_\-VERSION~1.9.1}}
\label{utlist_8h_a9f3779f3c49ddf609c97f1c3d1f29730}
\hypertarget{utstring_8h_LICENSE}{}\subsection{LICENSE}\label{utstring_8h_LICENSE}
Copyright (c) 2007-\/2010, Troy D. Hanson \href{http://uthash.sourceforge.net}{\tt http://uthash.sourceforge.net} All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \char`\"{}AS
IS\char`\"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

Definition at line 35 of file utlist.h.

